{include file="common/head"/}
<div class="admin-main layui-anim layui-anim-upbit">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>{$title}</legend>
    </fieldset>
    <form class="layui-form layui-form-pane" lay-filter="form">
        <div class="layui-form-item">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-4">
                <input type="text" name="name" lay-verify="required" placeholder="{:lang('pleaseEnter')}员工姓名" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                用户名在4到25个字符之间。
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">生日</label>
            <div class="layui-input-4">
                <input type="text" name="birthday" ng-model="field.birthday" id="birthday" value="" placeholder="生日" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">

            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">入职时间</label>
            <div class="layui-input-4">
                <input type="text" name="rztime" ng-model="field.rztime" id="rztime" value="" placeholder="请填写入职时间" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                写入职时间
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="hidden" name="admin_id">
                <button type="button" class="layui-btn" lay-submit="" lay-filter="submit">{:lang('submit')}</button>
                <a href="{:url('adminList')}" class="layui-btn layui-btn-primary">{:lang('back')}</a>
            </div>
        </div>
    </form>
</div>
{include file="common/foot"/}
<script>
    layui.use(['form', 'layer'], function () {
        var form = layui.form, layer = layui.layer,$= layui.jquery;
        var info = {$info|raw};
        form.val("form", info);
        form.render();
        form.on('submit(submit)', function (data) {
            loading =layer.load(1, {shade: [0.1,'#fff']});
            $.post("", data.field, function (res) {
                layer.close(loading);
                if (res.code > 0) {
                    layer.msg(res.msg, {time: 1800, icon: 1}, function () {
                        location.href = res.url;
                    });
                } else {
                    layer.msg(res.msg, {time: 1800, icon: 2});
                }
            });
        });

    });
</script>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#birthday' //指定元素
        });
    });
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#rztime' //指定元素
        });
    });
</script>